<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
 <link rel="stylesheet" href="css/style.css">

 <script src="js/jquery.js" type="text/javascript"></script>
</head>
	 
<body><!-- 
<?php include('../includes/mysqli_connect.php'); ?>
 <h1>Reneval</h1>
<div class="content">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quaerat, tempore, dolores, dolorum dolor tenetur facilis consectetur ea laborum praesentium accusantium ipsa officia iure quisquam adipisci ex in est sit cupiditate.
	Lorem ipsum dolor sit amet, consectetur adipisicing elit. Facere,
	 error, explicabo, necessitatibus, molestiae esse vero officia
	  illo excepturi commodi mollitia itaque perspiciatis porro eveniet fugit ea dolorem deleniti. At, et!
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias, facere, tenetur, quaerat sint quae illum tempora porro laudantium voluptatem blanditiis qui dolorum voluptatibus laborum voluptatum maxime consequatur ut rerum. Natus.
orem ipsum dolor sit amet, consectetur adipisicing elit. Laborum, repudiandae, sequi, explicabo, consequatur reiciendis deleniti itaque doloremque accusantium inventore impedit labore possimus accusamus perspiciatis. Illo neque nisi earum deleniti numquam.</p>

</div>



<script> 
		$(document).ready(function() {
			jQuery.fn.flash=function(speed,easing,callback){
				var $this=$(this);
			return $this.slideDown(2000,function(){
				$this.delay(2000).slideUp(500);

			});
		};
		var content=$('div.content');
		content.hide();
		$('h1').on('click',function(event){
		content.flash();
			event.preventDefault();
		});
		});
</script>
	

	 

	<h1>Something to Save</h1>
	<form action="#">
		<textarea name="content" id="content" ></textarea>
		<p><button type="submit">Save</button></p>
	</form>
	<script>
	$.post('load.php', function(data) {
		/*optional stuff to do after success */
		if (data) {
			$('#content').val(data);
		};
	});
	$(document).ready(function() {
			$('form').on('submit', function(event) {
				  $.post('save.php',$(this).serialize(), function(response) {
				  	console.log(response);
				 	/*optional stuff to do after success */
				 });

				event.preventDefault();
				 
			});
	});	
	</script>
<!-- ------------------------------------------------------------------ -->
 <h1>Search User by Name </h1>
	<form action="data.php" method="post">
		<select name="q" id="q">
			<?php $alphabet = str_split('abcdefghijklmn') ;
				foreach ($alphabet as $value ) {
					echo "<option value='$value'>$value</option>";
				}
			?>

		</select>
		<button type="submit">Save</button>
	</form>
	<?php if (isset($r)){?>
	 <ul>
 	<?php while ($data = mysqli_fetch_array($r,MYSQLI_ASSOC)) {
 		echo "<li data-user_id='{$data['user_id']}'><a href='user.php?id={$data['user_id']}'>{$data['first_name']} {$data['last_name']}</a></li>";
 	} ?>
 	</ul>
	<?php } ?>

</body>
</html>